#!/usr/bin/python3
import json

class JSONHandle:
    logger = None
    # def __init__(self):
    #     #setup_logging(default_path = "logging.json")

    # 读取Json 文件
    def read_json_file(path):
        info_dict = {}
        with open(path, 'r', encoding='utf-8') as file:
            info_dict = json.load(file)
        return info_dict

    # 写入Json 文件
    def write_json_file(path, jsontext):
        article = json.dumps(jsontext, ensure_ascii=False)
        with open(path, 'w', encoding='utf-8') as f:
            f.write(article)
            f.close()
        return True

if __name__ == '__main__':
    jsonHandle = JSONHandle("Testlog")
